package com.success.application;

import android.content.Context;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.success.application.user.AccountHelper;

/**
 * Created by qiujuer
 * on 2016/10/27.
 */
public class YuanbaoApplication extends AppContext {
    private static Context context;
    @Override
    public void onCreate() {
        super.onCreate();
        // 初始化账户基础信息
        AccountHelper.init(this);
        //获取Context
        context = getApplicationContext();
        //初始化 initImageLoader();
        initImageLoader();
    }
    //创建一个静态的方法，以便获取context对象
    //返回
    public static Context getContextObject(){
        return context;
    }
    private void initImageLoader() {
        ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(this);
        ImageLoader.getInstance().init(configuration);

    }
}
